@model ToDo.Models.ItemViewModels
@{
    ViewData["Title"] = "ChangeItem";
}
<link href="~/css/ChangeItem.css" rel="stylesheet" />
<form id="frmRegist" action="/item/GetBack?itemId=@Model.ItemId&
      isReturnSearch=@Model.IsReturnSearch&changeBeforeContent=@Model.ChangeBeforeContent&
      isReturnHomePage=@Model.IsReturnHomePage" method="post">
    
    <div class="item-all-information">
        <div class="item-information-part">
            <div class="information-name">
                <img src="~/images/内容.png" class="information-picture" />
                <span>内容</span>
            </div>
            <div class="information-content">
                <input name="Content" type="text" value="@Model.Content" maxlength="50" class="information" id="item-content" required />
            </div>
            <div class="error">
                <span id="content-error"></span>
            </div>
        </div><br>
        <div class="item-information-part">
            <div class="information-name">
                <img src="~/images/备注.png" class="information-picture" />
                <span>备注</span>
            </div>
            <div class="information-content">
                <input name="Mark" type="text" value="@Model.Mark" id="item-mark" class="information" required maxlength="30" /><span id="commit"></span>
            </div>
            <div class="error">
                <span id="mark-error"></span>
            </div>
        </div><br>
        <div class="item-information-part">
            <div class="information-name">
                <img src="~/images/创建时间.png" class="information-picture" />
                <span class="picture-mark">创建时间</span>
            </div>
            <div class="information-content">
                <span class="information" id="create-time">@Model.CreateTime</span>
            </div>
        </div><br>
        <div class="item-information-part">
            <div class="information-name">
                <img src="~/images/沙漏已过期.png" class="information-picture" />
                <span class="picture-mark">过期时间</span>
            </div>
            <div class="information-content">
                <input name="TimeOfExpiration" type="datetime-local" value="@Model.TimeOfExpiration.GetDateTimeFormats('s')[0].ToString()" class="information" id="finish-time" required />
            </div>
        </div><br>
        <input value="@Model.Content" name="Content" hidden />
        <input value="@Model.Mark" name="Mark" hidden />
        <input value="@Model.TimeOfExpiration" name="TimeOfExpiration" hidden />
        <input value="@Model.ItemId" name="ItemId" hidden />
        <input value="@Model.IsReturnSearch.ToString()" name="IsReturnSearch" hidden />
        <input value="@Model.ChangeBeforeContent" name="ChangeBeforeContent" hidden />
        <input value="@Model.IsReturnHomePage.ToString()" name="IsReturnHomePage" hidden /> 
        <div>
            <input type="submit" class="submit" />
            <a href="/item/GetBack?itemId=@Model.ItemId&isReturnSearch=@Model.IsReturnSearch&changeBeforeContent=@Model.ChangeBeforeContent&isReturnHomePage=@Model.IsReturnHomePage" class="return">返回</a>
        </div>
    </div>
</form>
